package com.gree.changying.activity.searchactivity.adapter;

import android.widget.ImageView;

import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.gree.changying.R;
import com.gree.changying.activity.searchactivity.bean.Search;

import java.util.List;

public class SearchAdapter extends BaseQuickAdapter<Search, BaseViewHolder> {
    public SearchAdapter(@LayoutRes int layoutResId, @Nullable List data) {
        super(layoutResId, data);
    }
    @Override
    protected void convert(BaseViewHolder helper, Search item) {
        ImageView img = helper.itemView.findViewById(R.id.img);
        Glide.with(mContext).load(item.getImg()).into(img);
        helper.setText(R.id.title,item.getTitle()+"");
        helper.setText(R.id.sl,item.getSl());
        helper.setText(R.id.jf,item.getJf()+"");
        helper.setText(R.id.tag,item.getTag()+"");
        helper.setText(R.id.date,item.getDate()+"");
        helper.setText(R.id.rq,item.getRq()+"");
        helper.setText(R.id.name1,item.getName1());
        helper.setText(R.id.name2,item.getName2()+"");
        helper.setText(R.id.name3,item.getName3()+"");
        helper.setText(R.id.bf,item.getBf()+"");

    }
}